Skip to content

Conversation

@ldematte
Copy link
Contributor

Backport of #124865

The JDK team has completely disabled the Java SecurityManager from Java 24. Elasticsearch has always used the Java SecurityManager as an additional protection mechanism; in order to retain this second line of defense, the Elasticsearch Core/Infra team has been working on the Entitlements project.

Similar to SecurityManager, Entitlements only allow calling specific methods in the JDK when the caller has a matching policy attached. In other words, if some code (in the main Elasticsearch codebase, in a plugin/module, or in a script) attempts to perform a "privileged" operation and it is not entitled to do so, a NotEntitledException will be thrown.

This PR includes the minimal set of changes to always use Entitlements, regardless of system properties or Java version.

Relates to ES-10921
@ldematte ldematte added >upgrade backport v8.18.1 :Core/Infra/Entitlements Entitlements infrastructure auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Mar 18, 2025
@elasticsearchmachine elasticsearchmachine merged commit 0d15294 into elastic:8.18 Mar 18, 2025
15 checks passed
@ldematte ldematte deleted the backport/8.18/entitlements/always-enabled-minimal branch March 18, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Entitlements Entitlements infrastructure >upgrade v8.18.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants